<?php
	/**
	 * This is a MetaControl class, providing a QForm or QPanel access to event handlers
	 * and QControls to perform the Create, Edit, and Delete functionality
	 * of the Myassets class.  This code-generated class
	 * contains all the basic elements to help a QPanel or QForm display an HTML form that can
	 * manipulate a single Myassets object.
	 *
	 * To take advantage of some (or all) of these control objects, you
	 * must create a new QForm or QPanel which instantiates a MyassetsMetaControl
	 * class.
	 *
	 * Any and all changes to this file will be overwritten with any subsequent
	 * code re-generation.
	 * 
	 * @package My Application
	 * @subpackage MetaControls
	 * property-read Myassets $Myassets the actual Myassets data class being edited
	 * property QLabel $IdControl
	 * property-read QLabel $IdLabel
	 * property QTextBox $AsinControl
	 * property-read QLabel $AsinLabel
	 * property QTextBox $DetailPageURLControl
	 * property-read QLabel $DetailPageURLLabel
	 * property QTextBox $TitleControl
	 * property-read QLabel $TitleLabel
	 * property QTextBox $ProductGroupControl
	 * property-read QLabel $ProductGroupLabel
	 * property QTextBox $ImageURLControl
	 * property-read QLabel $ImageURLLabel
	 * property QTextBox $AuthorControl
	 * property-read QLabel $AuthorLabel
	 * property QTextBox $NumberOfPagesControl
	 * property-read QLabel $NumberOfPagesLabel
	 * property QTextBox $PublisherControl
	 * property-read QLabel $PublisherLabel
	 * property QTextBox $IsbnControl
	 * property-read QLabel $IsbnLabel
	 * property QTextBox $ActorControl
	 * property-read QLabel $ActorLabel
	 * property QTextBox $DirectorControl
	 * property-read QLabel $DirectorLabel
	 * property QTextBox $RunningTimeControl
	 * property-read QLabel $RunningTimeLabel
	 * property QTextBox $ArtistControl
	 * property-read QLabel $ArtistLabel
	 * property QTextBox $LabelControl
	 * property-read QLabel $LabelLabel
	 * property QTextBox $NumberOfDiscsControl
	 * property-read QLabel $NumberOfDiscsLabel
	 * property QTextBox $TracksControl
	 * property-read QLabel $TracksLabel
	 * property QTextBox $LanguageControl
	 * property-read QLabel $LanguageLabel
	 * property QTextBox $GenreControl
	 * property-read QLabel $GenreLabel
	 * property QTextBox $OwnerControl
	 * property-read QLabel $OwnerLabel
	 * property-read string $TitleVerb a verb indicating whether or not this is being edited or created
	 * property-read boolean $EditMode a boolean indicating whether or not this is being edited or created
	 */

	class MyassetsMetaControlGen extends QBaseClass {
		// General Variables
		protected $objMyassets;
		protected $objParentObject;
		protected $strTitleVerb;
		protected $blnEditMode;

		// Controls that allow the editing of Myassets's individual data fields
		protected $lblId;
		protected $txtAsin;
		protected $txtDetailPageURL;
		protected $txtTitle;
		protected $txtProductGroup;
		protected $txtImageURL;
		protected $txtAuthor;
		protected $txtNumberOfPages;
		protected $txtPublisher;
		protected $txtIsbn;
		protected $txtActor;
		protected $txtDirector;
		protected $txtRunningTime;
		protected $txtArtist;
		protected $txtLabel;
		protected $txtNumberOfDiscs;
		protected $txtTracks;
		protected $txtLanguage;
		protected $txtGenre;
		protected $txtOwner;

		// Controls that allow the viewing of Myassets's individual data fields
		protected $lblAsin;
		protected $lblDetailPageURL;
		protected $lblTitle;
		protected $lblProductGroup;
		protected $lblImageURL;
		protected $lblAuthor;
		protected $lblNumberOfPages;
		protected $lblPublisher;
		protected $lblIsbn;
		protected $lblActor;
		protected $lblDirector;
		protected $lblRunningTime;
		protected $lblArtist;
		protected $lblLabel;
		protected $lblNumberOfDiscs;
		protected $lblTracks;
		protected $lblLanguage;
		protected $lblGenre;
		protected $lblOwner;

		// QListBox Controls (if applicable) to edit Unique ReverseReferences and ManyToMany References

		// QLabel Controls (if applicable) to view Unique ReverseReferences and ManyToMany References


		/**
		 * Main constructor.  Constructor OR static create methods are designed to be called in either
		 * a parent QPanel or the main QForm when wanting to create a
		 * MyassetsMetaControl to edit a single Myassets object within the
		 * QPanel or QForm.
		 *
		 * This constructor takes in a single Myassets object, while any of the static
		 * create methods below can be used to construct based off of individual PK ID(s).
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this MyassetsMetaControl
		 * @param Myassets $objMyassets new or existing Myassets object
		 */
		 public function __construct($objParentObject, Myassets $objMyassets) {
			// Setup Parent Object (e.g. QForm or QPanel which will be using this MyassetsMetaControl)
			$this->objParentObject = $objParentObject;

			// Setup linked Myassets object
			$this->objMyassets = $objMyassets;

			// Figure out if we're Editing or Creating New
			if ($this->objMyassets->__Restored) {
				$this->strTitleVerb = QApplication::Translate('Edit');
				$this->blnEditMode = true;
			} else {
				$this->strTitleVerb = QApplication::Translate('Create');
				$this->blnEditMode = false;
			}
		 }

		/**
		 * Static Helper Method to Create using PK arguments
		 * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
		 * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
		 * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to 
		 * edit, or if we are also allowed to create a new one, etc.
		 * 
		 * @param mixed $objParentObject QForm or QPanel which will be using this MyassetsMetaControl
		 * @param integer $intId primary key value
		 * @param QMetaControlCreateType $intCreateType rules governing Myassets object creation - defaults to CreateOrEdit
 		 * @return MyassetsMetaControl
		 */
		public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			// Attempt to Load from PK Arguments
			if (strlen($intId)) {
				$objMyassets = Myassets::Load($intId);

				// Myassets was found -- return it!
				if ($objMyassets)
					return new MyassetsMetaControl($objParentObject, $objMyassets);

				// If CreateOnRecordNotFound not specified, throw an exception
				else if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound)
					throw new QCallerException('Could not find a Myassets object with PK arguments: ' . $intId);

			// If EditOnly is specified, throw an exception
			} else if ($intCreateType == QMetaControlCreateType::EditOnly)
				throw new QCallerException('No PK arguments specified');

			// If we are here, then we need to create a new record
			return new MyassetsMetaControl($objParentObject, new Myassets());
		}

		/**
		 * Static Helper Method to Create using PathInfo arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this MyassetsMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing Myassets object creation - defaults to CreateOrEdit
		 * @return MyassetsMetaControl
		 */
		public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::PathInfo(0);
			return MyassetsMetaControl::Create($objParentObject, $intId, $intCreateType);
		}

		/**
		 * Static Helper Method to Create using QueryString arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this MyassetsMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing Myassets object creation - defaults to CreateOrEdit
		 * @return MyassetsMetaControl
		 */
		public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::QueryString('intId');
			return MyassetsMetaControl::Create($objParentObject, $intId, $intCreateType);
		}



		///////////////////////////////////////////////
		// PUBLIC CREATE and REFRESH METHODS
		///////////////////////////////////////////////

		/**
		 * Create and setup QLabel lblId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblId_Create($strControlId = null) {
			$this->lblId = new QLabel($this->objParentObject, $strControlId);
			$this->lblId->Name = QApplication::Translate('Id');
			if ($this->blnEditMode)
				$this->lblId->Text = $this->objMyassets->Id;
			else
				$this->lblId->Text = 'N/A';
			return $this->lblId;
		}

		/**
		 * Create and setup QTextBox txtAsin
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtAsin_Create($strControlId = null) {
			$this->txtAsin = new QTextBox($this->objParentObject, $strControlId);
			$this->txtAsin->Name = QApplication::Translate('Asin');
			$this->txtAsin->Text = $this->objMyassets->Asin;
			$this->txtAsin->Required = true;
			$this->txtAsin->MaxLength = Myassets::AsinMaxLength;
			return $this->txtAsin;
		}

		/**
		 * Create and setup QLabel lblAsin
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblAsin_Create($strControlId = null) {
			$this->lblAsin = new QLabel($this->objParentObject, $strControlId);
			$this->lblAsin->Name = QApplication::Translate('Asin');
			$this->lblAsin->Text = $this->objMyassets->Asin;
			$this->lblAsin->Required = true;
			return $this->lblAsin;
		}

		/**
		 * Create and setup QTextBox txtDetailPageURL
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtDetailPageURL_Create($strControlId = null) {
			$this->txtDetailPageURL = new QTextBox($this->objParentObject, $strControlId);
			$this->txtDetailPageURL->Name = QApplication::Translate('Detail Page U R L');
			$this->txtDetailPageURL->Text = $this->objMyassets->DetailPageURL;
			$this->txtDetailPageURL->TextMode = QTextMode::MultiLine;
			return $this->txtDetailPageURL;
		}

		/**
		 * Create and setup QLabel lblDetailPageURL
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblDetailPageURL_Create($strControlId = null) {
			$this->lblDetailPageURL = new QLabel($this->objParentObject, $strControlId);
			$this->lblDetailPageURL->Name = QApplication::Translate('Detail Page U R L');
			$this->lblDetailPageURL->Text = $this->objMyassets->DetailPageURL;
			return $this->lblDetailPageURL;
		}

		/**
		 * Create and setup QTextBox txtTitle
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtTitle_Create($strControlId = null) {
			$this->txtTitle = new QTextBox($this->objParentObject, $strControlId);
			$this->txtTitle->Name = QApplication::Translate('Title');
			$this->txtTitle->Text = $this->objMyassets->Title;
			$this->txtTitle->TextMode = QTextMode::MultiLine;
			return $this->txtTitle;
		}

		/**
		 * Create and setup QLabel lblTitle
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblTitle_Create($strControlId = null) {
			$this->lblTitle = new QLabel($this->objParentObject, $strControlId);
			$this->lblTitle->Name = QApplication::Translate('Title');
			$this->lblTitle->Text = $this->objMyassets->Title;
			return $this->lblTitle;
		}

		/**
		 * Create and setup QTextBox txtProductGroup
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtProductGroup_Create($strControlId = null) {
			$this->txtProductGroup = new QTextBox($this->objParentObject, $strControlId);
			$this->txtProductGroup->Name = QApplication::Translate('Product Group');
			$this->txtProductGroup->Text = $this->objMyassets->ProductGroup;
			$this->txtProductGroup->MaxLength = Myassets::ProductGroupMaxLength;
			return $this->txtProductGroup;
		}

		/**
		 * Create and setup QLabel lblProductGroup
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblProductGroup_Create($strControlId = null) {
			$this->lblProductGroup = new QLabel($this->objParentObject, $strControlId);
			$this->lblProductGroup->Name = QApplication::Translate('Product Group');
			$this->lblProductGroup->Text = $this->objMyassets->ProductGroup;
			return $this->lblProductGroup;
		}

		/**
		 * Create and setup QTextBox txtImageURL
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtImageURL_Create($strControlId = null) {
			$this->txtImageURL = new QTextBox($this->objParentObject, $strControlId);
			$this->txtImageURL->Name = QApplication::Translate('Image U R L');
			$this->txtImageURL->Text = $this->objMyassets->ImageURL;
			$this->txtImageURL->TextMode = QTextMode::MultiLine;
			return $this->txtImageURL;
		}

		/**
		 * Create and setup QLabel lblImageURL
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblImageURL_Create($strControlId = null) {
			$this->lblImageURL = new QLabel($this->objParentObject, $strControlId);
			$this->lblImageURL->Name = QApplication::Translate('Image U R L');
			$this->lblImageURL->Text = $this->objMyassets->ImageURL;
			return $this->lblImageURL;
		}

		/**
		 * Create and setup QTextBox txtAuthor
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtAuthor_Create($strControlId = null) {
			$this->txtAuthor = new QTextBox($this->objParentObject, $strControlId);
			$this->txtAuthor->Name = QApplication::Translate('Author');
			$this->txtAuthor->Text = $this->objMyassets->Author;
			$this->txtAuthor->TextMode = QTextMode::MultiLine;
			return $this->txtAuthor;
		}

		/**
		 * Create and setup QLabel lblAuthor
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblAuthor_Create($strControlId = null) {
			$this->lblAuthor = new QLabel($this->objParentObject, $strControlId);
			$this->lblAuthor->Name = QApplication::Translate('Author');
			$this->lblAuthor->Text = $this->objMyassets->Author;
			return $this->lblAuthor;
		}

		/**
		 * Create and setup QTextBox txtNumberOfPages
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtNumberOfPages_Create($strControlId = null) {
			$this->txtNumberOfPages = new QTextBox($this->objParentObject, $strControlId);
			$this->txtNumberOfPages->Name = QApplication::Translate('Number Of Pages');
			$this->txtNumberOfPages->Text = $this->objMyassets->NumberOfPages;
			$this->txtNumberOfPages->MaxLength = Myassets::NumberOfPagesMaxLength;
			return $this->txtNumberOfPages;
		}

		/**
		 * Create and setup QLabel lblNumberOfPages
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblNumberOfPages_Create($strControlId = null) {
			$this->lblNumberOfPages = new QLabel($this->objParentObject, $strControlId);
			$this->lblNumberOfPages->Name = QApplication::Translate('Number Of Pages');
			$this->lblNumberOfPages->Text = $this->objMyassets->NumberOfPages;
			return $this->lblNumberOfPages;
		}

		/**
		 * Create and setup QTextBox txtPublisher
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtPublisher_Create($strControlId = null) {
			$this->txtPublisher = new QTextBox($this->objParentObject, $strControlId);
			$this->txtPublisher->Name = QApplication::Translate('Publisher');
			$this->txtPublisher->Text = $this->objMyassets->Publisher;
			$this->txtPublisher->MaxLength = Myassets::PublisherMaxLength;
			return $this->txtPublisher;
		}

		/**
		 * Create and setup QLabel lblPublisher
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblPublisher_Create($strControlId = null) {
			$this->lblPublisher = new QLabel($this->objParentObject, $strControlId);
			$this->lblPublisher->Name = QApplication::Translate('Publisher');
			$this->lblPublisher->Text = $this->objMyassets->Publisher;
			return $this->lblPublisher;
		}

		/**
		 * Create and setup QTextBox txtIsbn
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtIsbn_Create($strControlId = null) {
			$this->txtIsbn = new QTextBox($this->objParentObject, $strControlId);
			$this->txtIsbn->Name = QApplication::Translate('Isbn');
			$this->txtIsbn->Text = $this->objMyassets->Isbn;
			$this->txtIsbn->MaxLength = Myassets::IsbnMaxLength;
			return $this->txtIsbn;
		}

		/**
		 * Create and setup QLabel lblIsbn
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblIsbn_Create($strControlId = null) {
			$this->lblIsbn = new QLabel($this->objParentObject, $strControlId);
			$this->lblIsbn->Name = QApplication::Translate('Isbn');
			$this->lblIsbn->Text = $this->objMyassets->Isbn;
			return $this->lblIsbn;
		}

		/**
		 * Create and setup QTextBox txtActor
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtActor_Create($strControlId = null) {
			$this->txtActor = new QTextBox($this->objParentObject, $strControlId);
			$this->txtActor->Name = QApplication::Translate('Actor');
			$this->txtActor->Text = $this->objMyassets->Actor;
			$this->txtActor->TextMode = QTextMode::MultiLine;
			return $this->txtActor;
		}

		/**
		 * Create and setup QLabel lblActor
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblActor_Create($strControlId = null) {
			$this->lblActor = new QLabel($this->objParentObject, $strControlId);
			$this->lblActor->Name = QApplication::Translate('Actor');
			$this->lblActor->Text = $this->objMyassets->Actor;
			return $this->lblActor;
		}

		/**
		 * Create and setup QTextBox txtDirector
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtDirector_Create($strControlId = null) {
			$this->txtDirector = new QTextBox($this->objParentObject, $strControlId);
			$this->txtDirector->Name = QApplication::Translate('Director');
			$this->txtDirector->Text = $this->objMyassets->Director;
			$this->txtDirector->TextMode = QTextMode::MultiLine;
			return $this->txtDirector;
		}

		/**
		 * Create and setup QLabel lblDirector
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblDirector_Create($strControlId = null) {
			$this->lblDirector = new QLabel($this->objParentObject, $strControlId);
			$this->lblDirector->Name = QApplication::Translate('Director');
			$this->lblDirector->Text = $this->objMyassets->Director;
			return $this->lblDirector;
		}

		/**
		 * Create and setup QTextBox txtRunningTime
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtRunningTime_Create($strControlId = null) {
			$this->txtRunningTime = new QTextBox($this->objParentObject, $strControlId);
			$this->txtRunningTime->Name = QApplication::Translate('Running Time');
			$this->txtRunningTime->Text = $this->objMyassets->RunningTime;
			$this->txtRunningTime->MaxLength = Myassets::RunningTimeMaxLength;
			return $this->txtRunningTime;
		}

		/**
		 * Create and setup QLabel lblRunningTime
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblRunningTime_Create($strControlId = null) {
			$this->lblRunningTime = new QLabel($this->objParentObject, $strControlId);
			$this->lblRunningTime->Name = QApplication::Translate('Running Time');
			$this->lblRunningTime->Text = $this->objMyassets->RunningTime;
			return $this->lblRunningTime;
		}

		/**
		 * Create and setup QTextBox txtArtist
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtArtist_Create($strControlId = null) {
			$this->txtArtist = new QTextBox($this->objParentObject, $strControlId);
			$this->txtArtist->Name = QApplication::Translate('Artist');
			$this->txtArtist->Text = $this->objMyassets->Artist;
			$this->txtArtist->TextMode = QTextMode::MultiLine;
			return $this->txtArtist;
		}

		/**
		 * Create and setup QLabel lblArtist
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblArtist_Create($strControlId = null) {
			$this->lblArtist = new QLabel($this->objParentObject, $strControlId);
			$this->lblArtist->Name = QApplication::Translate('Artist');
			$this->lblArtist->Text = $this->objMyassets->Artist;
			return $this->lblArtist;
		}

		/**
		 * Create and setup QTextBox txtLabel
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtLabel_Create($strControlId = null) {
			$this->txtLabel = new QTextBox($this->objParentObject, $strControlId);
			$this->txtLabel->Name = QApplication::Translate('Label');
			$this->txtLabel->Text = $this->objMyassets->Label;
			$this->txtLabel->MaxLength = Myassets::LabelMaxLength;
			return $this->txtLabel;
		}

		/**
		 * Create and setup QLabel lblLabel
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblLabel_Create($strControlId = null) {
			$this->lblLabel = new QLabel($this->objParentObject, $strControlId);
			$this->lblLabel->Name = QApplication::Translate('Label');
			$this->lblLabel->Text = $this->objMyassets->Label;
			return $this->lblLabel;
		}

		/**
		 * Create and setup QTextBox txtNumberOfDiscs
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtNumberOfDiscs_Create($strControlId = null) {
			$this->txtNumberOfDiscs = new QTextBox($this->objParentObject, $strControlId);
			$this->txtNumberOfDiscs->Name = QApplication::Translate('Number Of Discs');
			$this->txtNumberOfDiscs->Text = $this->objMyassets->NumberOfDiscs;
			$this->txtNumberOfDiscs->MaxLength = Myassets::NumberOfDiscsMaxLength;
			return $this->txtNumberOfDiscs;
		}

		/**
		 * Create and setup QLabel lblNumberOfDiscs
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblNumberOfDiscs_Create($strControlId = null) {
			$this->lblNumberOfDiscs = new QLabel($this->objParentObject, $strControlId);
			$this->lblNumberOfDiscs->Name = QApplication::Translate('Number Of Discs');
			$this->lblNumberOfDiscs->Text = $this->objMyassets->NumberOfDiscs;
			return $this->lblNumberOfDiscs;
		}

		/**
		 * Create and setup QTextBox txtTracks
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtTracks_Create($strControlId = null) {
			$this->txtTracks = new QTextBox($this->objParentObject, $strControlId);
			$this->txtTracks->Name = QApplication::Translate('Tracks');
			$this->txtTracks->Text = $this->objMyassets->Tracks;
			$this->txtTracks->TextMode = QTextMode::MultiLine;
			return $this->txtTracks;
		}

		/**
		 * Create and setup QLabel lblTracks
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblTracks_Create($strControlId = null) {
			$this->lblTracks = new QLabel($this->objParentObject, $strControlId);
			$this->lblTracks->Name = QApplication::Translate('Tracks');
			$this->lblTracks->Text = $this->objMyassets->Tracks;
			return $this->lblTracks;
		}

		/**
		 * Create and setup QTextBox txtLanguage
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtLanguage_Create($strControlId = null) {
			$this->txtLanguage = new QTextBox($this->objParentObject, $strControlId);
			$this->txtLanguage->Name = QApplication::Translate('Language');
			$this->txtLanguage->Text = $this->objMyassets->Language;
			$this->txtLanguage->MaxLength = Myassets::LanguageMaxLength;
			return $this->txtLanguage;
		}

		/**
		 * Create and setup QLabel lblLanguage
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblLanguage_Create($strControlId = null) {
			$this->lblLanguage = new QLabel($this->objParentObject, $strControlId);
			$this->lblLanguage->Name = QApplication::Translate('Language');
			$this->lblLanguage->Text = $this->objMyassets->Language;
			return $this->lblLanguage;
		}

		/**
		 * Create and setup QTextBox txtGenre
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtGenre_Create($strControlId = null) {
			$this->txtGenre = new QTextBox($this->objParentObject, $strControlId);
			$this->txtGenre->Name = QApplication::Translate('Genre');
			$this->txtGenre->Text = $this->objMyassets->Genre;
			$this->txtGenre->MaxLength = Myassets::GenreMaxLength;
			return $this->txtGenre;
		}

		/**
		 * Create and setup QLabel lblGenre
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblGenre_Create($strControlId = null) {
			$this->lblGenre = new QLabel($this->objParentObject, $strControlId);
			$this->lblGenre->Name = QApplication::Translate('Genre');
			$this->lblGenre->Text = $this->objMyassets->Genre;
			return $this->lblGenre;
		}

		/**
		 * Create and setup QTextBox txtOwner
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtOwner_Create($strControlId = null) {
			$this->txtOwner = new QTextBox($this->objParentObject, $strControlId);
			$this->txtOwner->Name = QApplication::Translate('Owner');
			$this->txtOwner->Text = $this->objMyassets->Owner;
			$this->txtOwner->MaxLength = Myassets::OwnerMaxLength;
			return $this->txtOwner;
		}

		/**
		 * Create and setup QLabel lblOwner
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblOwner_Create($strControlId = null) {
			$this->lblOwner = new QLabel($this->objParentObject, $strControlId);
			$this->lblOwner->Name = QApplication::Translate('Owner');
			$this->lblOwner->Text = $this->objMyassets->Owner;
			return $this->lblOwner;
		}



		/**
		 * Refresh this MetaControl with Data from the local Myassets object.
		 * @param boolean $blnReload reload Myassets from the database
		 * @return void
		 */
		public function Refresh($blnReload = false) {
			if ($blnReload)
				$this->objMyassets->Reload();

			if ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objMyassets->Id;

			if ($this->txtAsin) $this->txtAsin->Text = $this->objMyassets->Asin;
			if ($this->lblAsin) $this->lblAsin->Text = $this->objMyassets->Asin;

			if ($this->txtDetailPageURL) $this->txtDetailPageURL->Text = $this->objMyassets->DetailPageURL;
			if ($this->lblDetailPageURL) $this->lblDetailPageURL->Text = $this->objMyassets->DetailPageURL;

			if ($this->txtTitle) $this->txtTitle->Text = $this->objMyassets->Title;
			if ($this->lblTitle) $this->lblTitle->Text = $this->objMyassets->Title;

			if ($this->txtProductGroup) $this->txtProductGroup->Text = $this->objMyassets->ProductGroup;
			if ($this->lblProductGroup) $this->lblProductGroup->Text = $this->objMyassets->ProductGroup;

			if ($this->txtImageURL) $this->txtImageURL->Text = $this->objMyassets->ImageURL;
			if ($this->lblImageURL) $this->lblImageURL->Text = $this->objMyassets->ImageURL;

			if ($this->txtAuthor) $this->txtAuthor->Text = $this->objMyassets->Author;
			if ($this->lblAuthor) $this->lblAuthor->Text = $this->objMyassets->Author;

			if ($this->txtNumberOfPages) $this->txtNumberOfPages->Text = $this->objMyassets->NumberOfPages;
			if ($this->lblNumberOfPages) $this->lblNumberOfPages->Text = $this->objMyassets->NumberOfPages;

			if ($this->txtPublisher) $this->txtPublisher->Text = $this->objMyassets->Publisher;
			if ($this->lblPublisher) $this->lblPublisher->Text = $this->objMyassets->Publisher;

			if ($this->txtIsbn) $this->txtIsbn->Text = $this->objMyassets->Isbn;
			if ($this->lblIsbn) $this->lblIsbn->Text = $this->objMyassets->Isbn;

			if ($this->txtActor) $this->txtActor->Text = $this->objMyassets->Actor;
			if ($this->lblActor) $this->lblActor->Text = $this->objMyassets->Actor;

			if ($this->txtDirector) $this->txtDirector->Text = $this->objMyassets->Director;
			if ($this->lblDirector) $this->lblDirector->Text = $this->objMyassets->Director;

			if ($this->txtRunningTime) $this->txtRunningTime->Text = $this->objMyassets->RunningTime;
			if ($this->lblRunningTime) $this->lblRunningTime->Text = $this->objMyassets->RunningTime;

			if ($this->txtArtist) $this->txtArtist->Text = $this->objMyassets->Artist;
			if ($this->lblArtist) $this->lblArtist->Text = $this->objMyassets->Artist;

			if ($this->txtLabel) $this->txtLabel->Text = $this->objMyassets->Label;
			if ($this->lblLabel) $this->lblLabel->Text = $this->objMyassets->Label;

			if ($this->txtNumberOfDiscs) $this->txtNumberOfDiscs->Text = $this->objMyassets->NumberOfDiscs;
			if ($this->lblNumberOfDiscs) $this->lblNumberOfDiscs->Text = $this->objMyassets->NumberOfDiscs;

			if ($this->txtTracks) $this->txtTracks->Text = $this->objMyassets->Tracks;
			if ($this->lblTracks) $this->lblTracks->Text = $this->objMyassets->Tracks;

			if ($this->txtLanguage) $this->txtLanguage->Text = $this->objMyassets->Language;
			if ($this->lblLanguage) $this->lblLanguage->Text = $this->objMyassets->Language;

			if ($this->txtGenre) $this->txtGenre->Text = $this->objMyassets->Genre;
			if ($this->lblGenre) $this->lblGenre->Text = $this->objMyassets->Genre;

			if ($this->txtOwner) $this->txtOwner->Text = $this->objMyassets->Owner;
			if ($this->lblOwner) $this->lblOwner->Text = $this->objMyassets->Owner;

		}



		///////////////////////////////////////////////
		// PROTECTED UPDATE METHODS for ManyToManyReferences (if any)
		///////////////////////////////////////////////





		///////////////////////////////////////////////
		// PUBLIC MYASSETS OBJECT MANIPULATORS
		///////////////////////////////////////////////

		/**
		 * This will save this object's Myassets instance,
		 * updating only the fields which have had a control created for it.
		 */
		public function SaveMyassets() {
			try {
				// Update any fields for controls that have been created
				if ($this->txtAsin) $this->objMyassets->Asin = $this->txtAsin->Text;
				if ($this->txtDetailPageURL) $this->objMyassets->DetailPageURL = $this->txtDetailPageURL->Text;
				if ($this->txtTitle) $this->objMyassets->Title = $this->txtTitle->Text;
				if ($this->txtProductGroup) $this->objMyassets->ProductGroup = $this->txtProductGroup->Text;
				if ($this->txtImageURL) $this->objMyassets->ImageURL = $this->txtImageURL->Text;
				if ($this->txtAuthor) $this->objMyassets->Author = $this->txtAuthor->Text;
				if ($this->txtNumberOfPages) $this->objMyassets->NumberOfPages = $this->txtNumberOfPages->Text;
				if ($this->txtPublisher) $this->objMyassets->Publisher = $this->txtPublisher->Text;
				if ($this->txtIsbn) $this->objMyassets->Isbn = $this->txtIsbn->Text;
				if ($this->txtActor) $this->objMyassets->Actor = $this->txtActor->Text;
				if ($this->txtDirector) $this->objMyassets->Director = $this->txtDirector->Text;
				if ($this->txtRunningTime) $this->objMyassets->RunningTime = $this->txtRunningTime->Text;
				if ($this->txtArtist) $this->objMyassets->Artist = $this->txtArtist->Text;
				if ($this->txtLabel) $this->objMyassets->Label = $this->txtLabel->Text;
				if ($this->txtNumberOfDiscs) $this->objMyassets->NumberOfDiscs = $this->txtNumberOfDiscs->Text;
				if ($this->txtTracks) $this->objMyassets->Tracks = $this->txtTracks->Text;
				if ($this->txtLanguage) $this->objMyassets->Language = $this->txtLanguage->Text;
				if ($this->txtGenre) $this->objMyassets->Genre = $this->txtGenre->Text;
				if ($this->txtOwner) $this->objMyassets->Owner = $this->txtOwner->Text;

				// Update any UniqueReverseReferences (if any) for controls that have been created for it

				// Save the Myassets object
				$this->objMyassets->Save();

				// Finally, update any ManyToManyReferences (if any)
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * This will DELETE this object's Myassets instance from the database.
		 * It will also unassociate itself from any ManyToManyReferences.
		 */
		public function DeleteMyassets() {
			$this->objMyassets->Delete();
		}		



		///////////////////////////////////////////////
		// PUBLIC GETTERS and SETTERS
		///////////////////////////////////////////////

		/**
		 * Override method to perform a property "Get"
		 * This will get the value of $strName
		 *
		 * @param string $strName Name of the property to get
		 * @return mixed
		 */
		public function __get($strName) {
			switch ($strName) {
				// General MetaControlVariables
				case 'Myassets': return $this->objMyassets;
				case 'TitleVerb': return $this->strTitleVerb;
				case 'EditMode': return $this->blnEditMode;

				// Controls that point to Myassets fields -- will be created dynamically if not yet created
				case 'IdControl':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'IdLabel':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'AsinControl':
					if (!$this->txtAsin) return $this->txtAsin_Create();
					return $this->txtAsin;
				case 'AsinLabel':
					if (!$this->lblAsin) return $this->lblAsin_Create();
					return $this->lblAsin;
				case 'DetailPageURLControl':
					if (!$this->txtDetailPageURL) return $this->txtDetailPageURL_Create();
					return $this->txtDetailPageURL;
				case 'DetailPageURLLabel':
					if (!$this->lblDetailPageURL) return $this->lblDetailPageURL_Create();
					return $this->lblDetailPageURL;
				case 'TitleControl':
					if (!$this->txtTitle) return $this->txtTitle_Create();
					return $this->txtTitle;
				case 'TitleLabel':
					if (!$this->lblTitle) return $this->lblTitle_Create();
					return $this->lblTitle;
				case 'ProductGroupControl':
					if (!$this->txtProductGroup) return $this->txtProductGroup_Create();
					return $this->txtProductGroup;
				case 'ProductGroupLabel':
					if (!$this->lblProductGroup) return $this->lblProductGroup_Create();
					return $this->lblProductGroup;
				case 'ImageURLControl':
					if (!$this->txtImageURL) return $this->txtImageURL_Create();
					return $this->txtImageURL;
				case 'ImageURLLabel':
					if (!$this->lblImageURL) return $this->lblImageURL_Create();
					return $this->lblImageURL;
				case 'AuthorControl':
					if (!$this->txtAuthor) return $this->txtAuthor_Create();
					return $this->txtAuthor;
				case 'AuthorLabel':
					if (!$this->lblAuthor) return $this->lblAuthor_Create();
					return $this->lblAuthor;
				case 'NumberOfPagesControl':
					if (!$this->txtNumberOfPages) return $this->txtNumberOfPages_Create();
					return $this->txtNumberOfPages;
				case 'NumberOfPagesLabel':
					if (!$this->lblNumberOfPages) return $this->lblNumberOfPages_Create();
					return $this->lblNumberOfPages;
				case 'PublisherControl':
					if (!$this->txtPublisher) return $this->txtPublisher_Create();
					return $this->txtPublisher;
				case 'PublisherLabel':
					if (!$this->lblPublisher) return $this->lblPublisher_Create();
					return $this->lblPublisher;
				case 'IsbnControl':
					if (!$this->txtIsbn) return $this->txtIsbn_Create();
					return $this->txtIsbn;
				case 'IsbnLabel':
					if (!$this->lblIsbn) return $this->lblIsbn_Create();
					return $this->lblIsbn;
				case 'ActorControl':
					if (!$this->txtActor) return $this->txtActor_Create();
					return $this->txtActor;
				case 'ActorLabel':
					if (!$this->lblActor) return $this->lblActor_Create();
					return $this->lblActor;
				case 'DirectorControl':
					if (!$this->txtDirector) return $this->txtDirector_Create();
					return $this->txtDirector;
				case 'DirectorLabel':
					if (!$this->lblDirector) return $this->lblDirector_Create();
					return $this->lblDirector;
				case 'RunningTimeControl':
					if (!$this->txtRunningTime) return $this->txtRunningTime_Create();
					return $this->txtRunningTime;
				case 'RunningTimeLabel':
					if (!$this->lblRunningTime) return $this->lblRunningTime_Create();
					return $this->lblRunningTime;
				case 'ArtistControl':
					if (!$this->txtArtist) return $this->txtArtist_Create();
					return $this->txtArtist;
				case 'ArtistLabel':
					if (!$this->lblArtist) return $this->lblArtist_Create();
					return $this->lblArtist;
				case 'LabelControl':
					if (!$this->txtLabel) return $this->txtLabel_Create();
					return $this->txtLabel;
				case 'LabelLabel':
					if (!$this->lblLabel) return $this->lblLabel_Create();
					return $this->lblLabel;
				case 'NumberOfDiscsControl':
					if (!$this->txtNumberOfDiscs) return $this->txtNumberOfDiscs_Create();
					return $this->txtNumberOfDiscs;
				case 'NumberOfDiscsLabel':
					if (!$this->lblNumberOfDiscs) return $this->lblNumberOfDiscs_Create();
					return $this->lblNumberOfDiscs;
				case 'TracksControl':
					if (!$this->txtTracks) return $this->txtTracks_Create();
					return $this->txtTracks;
				case 'TracksLabel':
					if (!$this->lblTracks) return $this->lblTracks_Create();
					return $this->lblTracks;
				case 'LanguageControl':
					if (!$this->txtLanguage) return $this->txtLanguage_Create();
					return $this->txtLanguage;
				case 'LanguageLabel':
					if (!$this->lblLanguage) return $this->lblLanguage_Create();
					return $this->lblLanguage;
				case 'GenreControl':
					if (!$this->txtGenre) return $this->txtGenre_Create();
					return $this->txtGenre;
				case 'GenreLabel':
					if (!$this->lblGenre) return $this->lblGenre_Create();
					return $this->lblGenre;
				case 'OwnerControl':
					if (!$this->txtOwner) return $this->txtOwner_Create();
					return $this->txtOwner;
				case 'OwnerLabel':
					if (!$this->lblOwner) return $this->lblOwner_Create();
					return $this->lblOwner;
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

		/**
		 * Override method to perform a property "Set"
		 * This will set the property $strName to be $mixValue
		 *
		 * @param string $strName Name of the property to set
		 * @param string $mixValue New value of the property
		 * @return mixed
		 */
		public function __set($strName, $mixValue) {
			try {
				switch ($strName) {
					// Controls that point to Myassets fields
					case 'IdControl':
						return ($this->lblId = QType::Cast($mixValue, 'QControl'));
					case 'AsinControl':
						return ($this->txtAsin = QType::Cast($mixValue, 'QControl'));
					case 'DetailPageURLControl':
						return ($this->txtDetailPageURL = QType::Cast($mixValue, 'QControl'));
					case 'TitleControl':
						return ($this->txtTitle = QType::Cast($mixValue, 'QControl'));
					case 'ProductGroupControl':
						return ($this->txtProductGroup = QType::Cast($mixValue, 'QControl'));
					case 'ImageURLControl':
						return ($this->txtImageURL = QType::Cast($mixValue, 'QControl'));
					case 'AuthorControl':
						return ($this->txtAuthor = QType::Cast($mixValue, 'QControl'));
					case 'NumberOfPagesControl':
						return ($this->txtNumberOfPages = QType::Cast($mixValue, 'QControl'));
					case 'PublisherControl':
						return ($this->txtPublisher = QType::Cast($mixValue, 'QControl'));
					case 'IsbnControl':
						return ($this->txtIsbn = QType::Cast($mixValue, 'QControl'));
					case 'ActorControl':
						return ($this->txtActor = QType::Cast($mixValue, 'QControl'));
					case 'DirectorControl':
						return ($this->txtDirector = QType::Cast($mixValue, 'QControl'));
					case 'RunningTimeControl':
						return ($this->txtRunningTime = QType::Cast($mixValue, 'QControl'));
					case 'ArtistControl':
						return ($this->txtArtist = QType::Cast($mixValue, 'QControl'));
					case 'LabelControl':
						return ($this->txtLabel = QType::Cast($mixValue, 'QControl'));
					case 'NumberOfDiscsControl':
						return ($this->txtNumberOfDiscs = QType::Cast($mixValue, 'QControl'));
					case 'TracksControl':
						return ($this->txtTracks = QType::Cast($mixValue, 'QControl'));
					case 'LanguageControl':
						return ($this->txtLanguage = QType::Cast($mixValue, 'QControl'));
					case 'GenreControl':
						return ($this->txtGenre = QType::Cast($mixValue, 'QControl'));
					case 'OwnerControl':
						return ($this->txtOwner = QType::Cast($mixValue, 'QControl'));
					default:
						return parent::__set($strName, $mixValue);
				}
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}
	}
?>